package com.epam.OOP.utils;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

/**
 * Created with IntelliJ IDEA.
 * User: Yelena_M
 * Date: 04.08.13
 * Time: 23:55
 * To change this template use File | Settings | File Templates.
 */
public class PropertiesReader {

    private Properties properties = new java.util.Properties();

    public void loadProperties() {
        try {
            properties.load(new FileInputStream("data.properties"));
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

    public String getProperties(String nameProperties) {
        loadProperties();
        return properties.getProperty(nameProperties);
    }
}
